import request from '@/utils/request'
import mockRequest from '@/mock/mockAjax'


// 获取商户商品分类列表
export function getCategoryByShop(params) {
    return request({
        url: '/shop/categoryList',
        method: 'get',
        params: params
    })
}

// 获取商品列表
export function getGoodsByShop(params) {
    return request({
        url: '/shop/goodList',
        method: 'get',
        params: params
    })
}

// 按分类搜索商户商品列表
export function getGoodsByCategory(params) {
    return request({
        url: '/shop/goodListByCategory',
        method: 'get',
        params: params
    })
}

// 搜索商品列表
export function searchShopGoods(params) {
    return request({
        url: '/shop/searchShopGoods',
        method: 'get',
        params: params
    })
}

//获取找店铺首页的店铺列表
export function getStoreListAPI(params) {
    return mockRequest({
        url: '/storeList',
        method: 'get',
        params: params
    })
    // return request({
    //     url: '/shops/store/list',
    //     method: 'get',
    //     params: params
    // })
}
//获取店铺首页的店铺排行榜列表
export function getStoreRankAPI() {
    return mockRequest({
        url: '/storeRank',
        method: 'get',
    })
}
